package aop05;

import org.aspectj.lang.ProceedingJoinPoint;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/8 15:18
 * Version:1.0-SNAPSHOT
 */
public class AroundAdvice {

    public Object around(ProceedingJoinPoint jp) throws Throwable{
        try {
            System.out.println("环绕通知之前置通知");
            Object result = jp.proceed();
            System.out.println("环绕通知之正常返回通知");
            return result;
        } catch (Throwable e) {
            System.out.println("环绕通知之异常通知");
            throw e;
        } finally {
            System.out.println("环绕通知之后置通知");
        }

    }

}
